package com.siyue.neo4j_demo.controller;

import com.siyue.neo4j_demo.entity.Person;
import com.siyue.neo4j_demo.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("/person")
public class PersonController {

    @Autowired
    private PersonService personService;


    @PostMapping("/add")
    public void addPerson(){
        Person person=new Person();
        person.setName("测试");
        person.setAge("15");
        person.setSex("男");
        personService.addDongMan(person);
    }
}
